import { Component } from 'react';
import { Route, Routes } from 'react-router-dom';
import MyLink from '../router-item/myLink';
import Dome3 from './Demo3';
class Dome2 extends Component {
  state = {
    msgData: {
      title: '你好',
      content: '就达萨罗开房记录',
    },
  };
  render() {
    const { msgData } = this.state;
    return (
      <div>
        <h2>二级路由demo2</h2>
        <br />
        <br />
        <br />
        <br />
        <MyLink
          replace={true}
          to={`/dome/dome2/dome3/${msgData.title}/${msgData.content}`}
          children="展示三级路由"
        />
        <br />
        <br />
        <Routes>
          <Route path="/dome3/:id/:content" element={<Dome3 />} />
        </Routes>
      </div>
    );
  }
}

export default Dome2;
